#ifndef VScintillaBase_H
#define VScintillaBase_H

#include <QObject>
#include <QString>

#include <Qsci/qsciscintilla.h>

class VScintillaBase : public QsciScintilla
{
    Q_OBJECT
public:
    explicit VScintillaBase(QWidget *parent = nullptr);

//    void init_setting();
//    void init_connect();

    int cursorPos();
    int cursorOfLine();
    int anchorPos();
    int anchorOfLine();
    int posOfLine(int pos);
    int lineFoldLevel(int line);
    int lineStartPos(int line);
    int lineEndPos(int line);
    int positionFormPoint(int x, int y);
    int posToLineQStringPos(int pos);
    void setSelect(int start, int end);
    void setSelectStartPos(int pos);
    void setSelectEndPos(int pos);
    void setCursorPos(int pos);
    void setAnchorPos(int pos);
    void setLineFold(int line);
    void insertText(int pos, const char *text);
    void deleteRange(int pos, int length);
    void backTab();
    void Tab();
    void clear();
    void addText(QString text);
    bool getFoldExpanded(int line);
};

#endif // VSCINTILLA_H
